home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / grafik / raytracing / rayshade-4.0.6.3 / rayview / main.c < prev    next >
C/C++ Source or Header  |  1994-08-09  |  2KB  |  78 lines

  1. /*
  2.  * main.c
  3.  *
  4.  * Copyright (C) 1989, 1991, Craig E. Kolb
  5.  * All rights reserved.
  6.  *
  7.  * This software may be freely copied, modified, and redistributed
  8.  * provided that this copyright notice is preserved on all copies.
  9.  *
  10.  * You may not distribute this software, in whole or in part, as part of
  11.  * any commercial product without the express consent of the authors.
  12.  *
  13.  * There is no warranty or other guarantee of fitness of this software
  14.  * for any purpose.  It is provided solely "as is".
  15.  *
  16.  * main.c,v 4.1 1994/08/09 08:08:04 explorer Exp
  17.  *
  18.  * main.c,v
  19.  * Revision 4.1  1994/08/09  08:08:04  explorer
  20.  * Bump version to 4.1
  21.  *
  22.  * Revision 1.1.1.1  1994/08/08  04:52:29  explorer
  23.  * Initial import.  This is a prerelease of 4.0.6enh3, or 4.1 possibly.
  24.  *
  25.  * Revision 4.0  91/07/17  14:55:35  kolb
  26.  * Initial version.
  27.  * 
  28.  */
  29.  
  30. char rcsid[] = "main.c,v 4.1 1994/08/09 08:08:04 explorer Exp";
  31.  
  32. #include "rayshade.h"
  33. #include "options.h"
  34. #include "stats.h"
  35. #include "viewing.h"
  36. #include "picture.h"
  37.  
  38.  
  39. int
  40. main(argc, argv)
  41. int argc;
  42. char **argv;
  43. {
  44.     Float utime, stime;
  45.  
  46.     /*
  47.       * Initialize variables, etc.
  48.      */
  49.     RSInitialize(argc, argv);
  50.     MethodsRegister();
  51.  
  52.     RSStartFrame(0);
  53.     /*
  54.       * Print more information than we'll ever need to know...
  55.      */
  56.     if (Options.verbose) {
  57.         extern Geom *World;
  58.         /* World object info. */
  59.         AggregatePrintInfo(World, Stats.fstats);
  60.         /* Print info about rendering options and the like. */
  61.         RSOptionsList();
  62.     }
  63.     /*
  64.      * Print preprocessing time.
  65.      */
  66.     RSGetCpuTime(&utime, &stime);
  67.     fprintf(Stats.fstats,"Preprocessing time:\t");
  68.     fprintf(Stats.fstats,"%2.2fu  %2.2fs\n", utime, stime);
  69.     fprintf(Stats.fstats,"Starting trace.\n");
  70.     (void)fflush(Stats.fstats);
  71.     /*
  72.      * Draw the image.
  73.      */
  74.     Render();
  75.     StatsPrint();
  76.     return 0;
  77. }
  78.